<!DOCTYPE html>
<html>
<head>
    <title>订单结算</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content=""/>
    <meta name="description"
          content=""/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="/Public/css.css"/>
	<style>
	.order_user1 {
	    background-color: #fff;
	    background-image: url("/Public/images/line_bg2.png");
	    background-position: 0 bottom;
	    background-repeat: repeat-x;
	    color: #666;
	    display: block;
	    padding: 0.5rem 8% 1rem 5%;
	    position: relative;
	}
	
	.order_user1::after {
	    background-repeat: no-repeat;
	    background-size: 100% auto;
	    content: "";
	    height: 2rem;
	    margin-top: -1rem;
	    position: absolute;
	    right: 0.2rem;
	    top: 50%;
	    width: 1rem;
	}
	</style>
</head>
<body id="orderAccount">
<script type="text/javascript">
    (function () {
        document.documentElement.style.fontSize = (document.body.offsetWidth/320) * 14 + 'px';
    })()
</script>
<div class="header">
    <!--<a href="javascript:;" class="logo"></a>-->
    <a href="javascript:history.back(-1);" class="backbtn_02"></a>订单详情
    <!--<a href="" class="gobuy">继续购物</a>-->
</div>
<div class="content2">

    <!--search-->

    <div class="order_code">
        <span>订单编号：{$order_en.order_id}</span> <a href="">{$order_en.order_status_text}</a>
    </div>


    <!--
    <div class="order_status">
        <p><span class="status_tit">入库</span><span class="status_data">2016-04-10 18:21:31</span></p>
        <p><span class="status_tit">发货</span><span class="status_data">2016-04-10 18:21:31</span></p>
        <p><span class="status_tit">派送</span><span class="status_data">2016-04-10 18:21:31</span></p>
        <p><span class="status_tit">派送成功</span><span class="status_data">2016-04-10 18:21:31</span></p>
    </div>
-->
    <!---->
    


    <a href="#" class="order_user1">
        <p><span class="order_name">收货人：{$order_en.consignee_name}</span><span class="order_tel">{$order_en.consignee_cellphone}</span></p>
        <p class="order_address">{$order_en.consignee_province} {$order_en.consignee_city} {$order_en.consignee_district} {$order_en.consignee_address}</p>
    </a>
    <!---->
    <div class="prodbox">
        <div class="hd"> <span class="t1">商品列表</span> <span class="t2">共{$order_en.goods_qty}件商品</span></div>
        <ul class="prodlist">
            <volist name="lst_order_detail_en" id="order_detail_en">
            	<li>
                 <div class="prodimg">
                     <img src="{$order_detail_en.image}" alt=""/>
                 </div>
                 <div class="proddetail">
                     <p class="prodname">{$order_detail_en.style_name}</p>
                     <p class="price">{$order_detail_en.sale_price}</p>
                     <p class="prod_num">{$order_detail_en.qty}</p>
                 </div>

            	</li>
            </volist>
        </ul>
    </div>

    <div class="order_status">
        <p>配送信息</p>
        <p>由商家选择合作快递为您配送</p>
    </div>
    <!---->
    <dl class="payment">
        <dt>支付方式</dt>
        <dd>
            <img src="/Public/images/zfb.jpg" alt="" class="pay_company"/>
        </dd>
    </dl>

    <!---->

    <div class="paytotal">
      <p><span class="t_dt">商品金额</span><span class="t_dd">￥{$order_en.goods_amount}</span></p>
      <p><span class="t_dt">折扣金额</span><span class="t_dd">￥{$order_en.discount_fee}</span></p>
      <p><span class="t_dt">运费合计</span><span class="t_dd">￥{$order_en.freight}</span></p>
      <div class="total_num">
          <p class="t_title"><span>实付款：</span><span class="t_money">￥{$order_en.order_amount}</span></p>
          <p class="total_data">下单时间：{$order_en.order_date}</p>
      </div>


    </div>

</div>
<div class="cartfix2">
	<if condition="$can_cancel eq 1">
		<a id="btn_cancel" order_id="{$order_en.order_id}" href="#" class="btn_cancel">取消订单</a>
	</if>
    <if condition="$can_payment eq 1">
		<b><a href="/buy/orderSuccess?order_id={$order_en.order_id}" class="btn_ok">尚未支付，去支付</a></b>
	</if>
    
</div>

<script type="text/javascript" src="/Public/js/zepto.js"></script>
<script type="text/javascript" src="/Public/js/wj.js"></script>
<script type="text/javascript" src="/Public/js/ajaxService.js"></script>
<script type="text/javascript" src="/Public/js/common.js"></script>
<script type="text/javascript" >
	$(document).ready(function(){
		$('#btn_cancel').bind('click', function(){
			var order_id = $(this).attr('order_id');
			
			if(confirm("确认要取消订单么？")){
				var result = OrderService.CancelOrder(order_id);
				
				if(result.IsSuccess == 0){
					alert(result.ErrorMsg);
					return;
				}
				else{
					alert('订单取消成功！');
					location.reload();
				}
			}
		});
	});
</script>
</body>
</html>